package Book;

public class Book {
    private String nameBook;
    private String author;
    private int price;
    private String type;
    private boolean state;

    public Book(String nameBook, String author, int price, String type) {
        this.nameBook = nameBook;
        this.author = author;
        this.price = price;
        this.type = type;
    }

    @Override
    public String toString() {
        return "Book{" +
                "nameBook='" + nameBook + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", "+(state == false ?"该书未被借出 ":"该书已经借出 ") +
                '}';
    }
}
